/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author ADMIN
 */
@Entity
@Table(name = "teachers")
@NamedQueries({
    @NamedQuery(name = "Teachers.findAll", query = "SELECT t FROM Teachers t"),
    @NamedQuery(name = "Teachers.findByTid", query = "SELECT t FROM Teachers t WHERE t.tid = :tid"),
    @NamedQuery(name = "Teachers.findByTname", query = "SELECT t FROM Teachers t WHERE t.tname = :tname"),
    @NamedQuery(name = "Teachers.findByTpass", query = "SELECT t FROM Teachers t WHERE t.tpass = :tpass"),
    @NamedQuery(name = "Teachers.findByTfullname", query = "SELECT t FROM Teachers t WHERE t.tfullname = :tfullname"),
    @NamedQuery(name = "Teachers.findByTdob", query = "SELECT t FROM Teachers t WHERE t.tdob = :tdob")})
public class Teachers implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "tid")
    private Integer tid;
    @Basic(optional = false)
    @Column(name = "tname")
    private String tname;
    @Basic(optional = false)
    @Column(name = "tpass")
    private String tpass;
    @Basic(optional = false)
    @Column(name = "tfullname")
    private String tfullname;
    @Column(name = "tdob")
    @Temporal(TemporalType.TIMESTAMP)
    private Date tdob;

    public Teachers() {
    }

    public Teachers(Integer tid) {
        this.tid = tid;
    }

    public Teachers(Integer tid, String tname, String tpass, String tfullname) {
        this.tid = tid;
        this.tname = tname;
        this.tpass = tpass;
        this.tfullname = tfullname;
    }

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    public String getTpass() {
        return tpass;
    }

    public void setTpass(String tpass) {
        this.tpass = tpass;
    }

    public String getTfullname() {
        return tfullname;
    }

    public void setTfullname(String tfullname) {
        this.tfullname = tfullname;
    }

    public Date getTdob() {
        return tdob;
    }

    public void setTdob(Date tdob) {
        this.tdob = tdob;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (tid != null ? tid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Teachers)) {
            return false;
        }
        Teachers other = (Teachers) object;
        if ((this.tid == null && other.tid != null) || (this.tid != null && !this.tid.equals(other.tid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Teachers[tid=" + tid + "]";
    }

}
